<?php
namespace jy_zhongyi;
defined('BY_JYA') or exit('error');
/*
	任务
*/
class task extends \plugin{
	/*
		订单状态UP
	*/
	public function orderup(){
		$params=array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']);
		//关闭订单
		$params['status']=0;
		$shopset['orderpay_outtime']=$shopset['orderpay_outtime']?$shopset['orderpay_outtime']:24;
		$orderpay_outtime=time()-12*3600;
		$params['createtime <']=$orderpay_outtime;
		$order = pdo_getall('jy_zhongyi_order',$params,'id');
		if($order){
			foreach($order as $a){
				if($a['id']){
					$this->model('order')->order_cancel($a['id']);
				}			
			}
		}
	}
}